import datetime


def log_decorator(func):
    def wrapper(*args, **kwargs):
        start_time = datetime.datetime.now()
        print(f"调用函数: {func.__name__}, 时间: {start_time}, 参数: {args}, 关键字参数: {kwargs}")

        result = func(*args, **kwargs)

        end_time = datetime.datetime.now()
        print(f"函数: {func.__name__} 调用结束, 时间: {end_time}")

        return result

    return wrapper


@log_decorator
def T_function(a, b):
    return a + b


if __name__ == '__main__':
    T_function(a=1, b=2)
